package com.atguigu.Text

object ScalaTest01 {
  def main(args: Array[String]): Unit = {
    //变量声明中的模式匹配
    val (x,y)=(1,2)
    println(s"x = $x , y= $y")
    val Array(first , second ,_*) = Array(1,7,2,9)
    println(s"first = $first , second = $second")

    val Person(name, age) = Person("zhangsan", 16)
    println(s"name=$name,age=$age")
  }
  case class Person(str: String, i: Int)

}
